import Vue from 'vue';
import ElementUI from 'element-ui'; // 2.1引入结构
import 'element-ui/lib/theme-chalk/index.css'; // 2.2引入样式
import App from './App.vue';
import router from './router';
import axios from 'axios';

Vue.prototype.$axios = axios;
Vue.use(ElementUI); // 3.安装


//富文本
import VueQuillEditor from 'vue-quill-editor'
import 'quill/dist/quill.core.css'
import 'quill/dist/quill.snow.css'
import 'quill/dist/quill.bubble.css'
Vue.use(VueQuillEditor)

//富文本加强
import { quillEditor, Quill } from 'vue-quill-editor'
import { container, ImageExtend, QuillWatch } from 'quill-image-extend-module'
Quill.register('modules/ImageExtend', ImageExtend)


import echarts from 'echarts'
//需要挂载到Vue原型上
Vue.prototype.$echarts = echarts


import VueCropper from 'vue-cropper'
Vue.use(VueCropper)


import VueContextMenu from 'vue-contextmenu'
Vue.use(VueContextMenu)

// 将自定义方法挂载到vue原型上
Vue.prototype.message = function (res) {
  this.$message({
    type: res.data.success ? 'success' : 'error',
    message: res.data.message,
  })
}

import content from '../public/js/global_variable'
//将自定义变量挂载到vue原型上
Vue.prototype.$myContent = content,


new Vue({
  router,
  el: '#app',
  render: h => h(App)
});